<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta charset="utf-8" />
<title>Dashboard - Ace Admin</title>

<meta name="description" content="overview &amp; stats" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />


<!-- bootstrap.css -->
<link rel="stylesheet" href="../bootStrapTable/css/bootstrap.min.css" type="text/css"></link>
<link rel="stylesheet" href="../bootStrapTable/css/bootstrap-table.css" type="text/css"></link>
<link rel='icon' href="../assets/images/avatars/avatar.png" ></link>
<link rel="stylesheet" href="../assets/css/bootstrap.min.css" ></link>
<link rel="stylesheet" href="../assets/font-awesome/4.5.0/css/font-awesome.min.css" ></link>
<link rel="stylesheet" href="../assets/css/fonts.googleapis.com.css" ></link>
<link rel="stylesheet" href="../assets/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style" ></link>
<link rel="stylesheet" href="../assets/css/ace-skins.min.css" ></link>
<link rel="stylesheet" href="../assets/css/ace-rtl.min.css" ></link>
<script src="../assets/js/ace-extra.min.js"></script>
<script src="../assets/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript">
	if ('ontouchstart' in document.documentElement)
		document.write("<script src='../assets/js/jquery.mobile.custom.min.js'>" + "<"+"/script>");
</script>
<script src="../assets/js/bootstrap.min.js"></script>
<script src="../assets/js/jquery-ui.custom.min.js"></script>
<script src="../assets/js/ace-elements.min.js"></script>
<script src="../assets/js/ace.min.js"></script>

<!-- 修改表格的JS -->
<script type="text/javascript" src="../bootStrapTable/js/bootstrap-editable.min.js"></script>
<!-- 显示表格的JS -->
<script src="../bootStrapTable/js/bootstrap-table.js"></script>
<script src="../bootStrapTable/js/bootstrap-table-zh-CN.js"></script>
<script type="text/javascript" src="../layer/layer.js"></script>
<script type="text/javascript" src='../cartype/cartype.js'></script>
<script type="text/javascript">
	jQuery(function($) {

		/////////////////////////////////////
		$(document).one('ajaxloadstart.page', function(e) {
			$tooltip.remove();
		});

		var d1 = [];
		for (var i = 0; i < Math.PI * 2; i += 0.5) {
			d1.push([ i, Math.sin(i) ]);
		}

		var d2 = [];
		for (var i = 0; i < Math.PI * 2; i += 0.5) {
			d2.push([ i, Math.cos(i) ]);
		}

		var d3 = [];
		for (var i = 0; i < Math.PI * 2; i += 0.2) {
			d3.push([ i, Math.tan(i) ]);
		}

		$('#recent-box [data-rel="tooltip"]').tooltip({
			placement : tooltip_placement
		});
		function tooltip_placement(context, source) {
			var $source = $(source);
			var $parent = $source.closest('.tab-content')
			var off1 = $parent.offset();
			var w1 = $parent.width();

			var off2 = $source.offset();
			//var w2 = $source.width();

			if (parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2))
				return 'right';
			return 'left';
		}

		$('.dialogs,.comments').ace_scroll({
			size : 300
		});

		//Android's default browser somehow is confused when tapping on label which will lead to dragging the task
		//so disable dragging when clicking on label
		var agent = navigator.userAgent.toLowerCase();
		if (ace.vars['touch'] && ace.vars['android']) {
			$('#tasks').on('touchstart', function(e) {
				var li = $(e.target).closest('#tasks li');
				if (li.length == 0)
					return;
				var label = li.find('label.inline').get(0);
				if (label == e.target || $.contains(label, e.target))
					e.stopImmediatePropagation();
			});
		}

		$('#tasks').sortable({
			opacity : 0.8,
			revert : true,
			forceHelperSize : true,
			placeholder : 'draggable-placeholder',
			forcePlaceholderSize : true,
			tolerance : 'pointer',
			stop : function(event, ui) {
				//just for Chrome!!!! so that dropdowns on items don't appear below other items after being moved
				$(ui.item).css('z-index', 'auto');
			}
		});
		$('#tasks').disableSelection();
		$('#tasks input:checkbox').removeAttr('checked').on('click', function() {
			if (this.checked)
				$(this).closest('li').addClass('selected');
			else
				$(this).closest('li').removeClass('selected');
		});

		//show the dropdowns on top or bottom depending on window height and menu position
		$('#task-tab .dropdown-hover').on('mouseenter', function(e) {
			var offset = $(this).offset();

			var $w = $(window)
			if (offset.top > $w.scrollTop() + $w.innerHeight() - 100)
				$(this).addClass('dropup');
			else
				$(this).removeClass('dropup');
		});

	})
</script>
</head>

<body class="no-skin">
	<!-- 头部框 -->
	<div th:include='top.html'></div>


	<!-- 中部内容 -->
	<div th:include='cartype/cartype_content.html'></div>
</body>
</html>
